package com.jxd.project.wzgl.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jxd.project.menu.model.ApplicationGoods;
import com.jxd.project.wzgl.vo.HistoryBRGoods;

import java.util.List;

public interface IApplicationGoodsService extends IService<ApplicationGoods> {
    /**
     * 根据申请ID删除申请物资子表数据
     * @param applicationId
     * @return
     */
    boolean delWithApplicationId(int applicationId);

    /**
     * 根据多个申请ID删除申请物资子表数据
     * @param applicationIds
     * @return
     */
    boolean delWithApplicationIds(List<Integer> applicationIds);

    /**
     * 根据员工Id查询未归还的记录
     * @param employeeId
     * @param warehouseId
     * @return
     */
    List<ApplicationGoods> getNotReturnGoods(int employeeId, int warehouseId);

    /**
     * 根据申请Id查询申请物资子表
     * @param applicationId
     * @return
     */
    List<ApplicationGoods> getWithApplicationId(int applicationId);

    /**
     * 根据id批量更新冲销状态
     * @param applicationGoodsIds
     * @return
     */
    boolean returnGoods(List<Integer> applicationGoodsIds);

    /**
     * 批量更改归还申请表状态
     * @param biIds
     * @return
     */
    boolean resetApplicationStatus(List<Integer> biIds);

    /**
     * 查询历史申请记录
     * @param empNo
     * @return
     */
    List<HistoryBRGoods> getHistoryBRGoods(Integer empNo);
}
